/*
 * @Description: 图像检索结果页面
 * @Author: ZzT
 * @Date: 2023-03-03 14:33:10
 * @LastEditTime: 2023-03-08 17:28:40
 */
import { useState } from 'react';
import { useLocation } from 'react-router-dom';
import ResultHeader from './components/ResultHeader';
import ResultList from './components/ResultList';
import { ImageResultContextProvider } from './contexts/ImageResultContext';

const ImageResultMain = () => {
  const location = useLocation();
  const { state: routeState }: any = location;
  console.log('routeState', routeState);

  return (
    <>
      <ImageResultContextProvider>
        <ResultHeader type={routeState.type} />
        <ResultList routeState={routeState} />
      </ImageResultContextProvider>
    </>
  );
};
export default ImageResultMain;
